package ${package.ServiceImpl};

import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
<#if generateService>
import ${package.Service}.${table.serviceName};
</#if>
import ${superServiceImplClassPackage};
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

/**
* <p>
    * ${table.comment!} 服务实现类
    * </p>
*
* @author ${author}
* @date ${date}
*/
@Service
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}><#if generateService> implements ${table.serviceName}</#if> {

    @Override
    public List<${entity}> select${entity}List(${entity} ${entity?uncap_first}) {
        //  根据条件查询${table.comment!}列表
        return this.list();
    }

    @Override
    public ${entity} select${entity}ById(Long id) {
        //  根据ID查询${table.comment!}信息
        return this.getById(id);
    }

    @Override
    @Transactional
    public boolean save${entity}(${entity} ${entity?uncap_first}) {
        //  新增${table.comment!}
        return this.save(${entity?uncap_first});
    }

    @Override
    @Transactional
    public boolean update${entity}(${entity} ${entity?uncap_first}) {
        //  修改${table.comment!}
        return this.updateById(${entity?uncap_first});
    }

    @Override
    @Transactional
    public boolean delete${entity}ById(Long id) {
        //  删除${table.comment!}信息
        return this.removeById(id);
    }

    @Override
    @Transactional
    public boolean save${entity}Batch(List<${entity}> list) {
        //  批量保存${table.comment!}数据
        return this.saveBatch(list);
    }
}